package com.zbkj.crmeb.category.service;

import java.util.HashMap;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.PageParamRequest;
import com.crmeb.core.common.CommonResult;
import com.zbkj.crmeb.category.model.Category;
import com.zbkj.crmeb.category.request.CategoryRequest;
import com.zbkj.crmeb.category.request.CategorySearchRequest;
import com.zbkj.crmeb.category.request.UpdateCateRatioRequest;
import com.zbkj.crmeb.category.vo.CategoryTreeVo;
import com.zbkj.crmeb.chant.model.CategoryMatch;

/**
* @author Mr.Zhang
* @Description CategoryService 接口
* @since 2020-04-16
*/
public interface CategoryService extends IService<Category> {
    List<Category> getList(CategorySearchRequest request, PageParamRequest pageParamRequest);

    int delete(Integer id);

    String getPathByPId(Integer pid);

    List<CategoryTreeVo> getListTree(Integer type, Integer status, Integer merId);

    List<CategoryTreeVo> getFrontListTree(Integer type, Integer status);

    List<CategoryTreeVo> getListTree(Integer type, Integer status, List<Integer> categoryIdList);

    List<Category> getByIds(List<Integer> ids);

    HashMap<Integer, String> getListInId(List<Integer> cateIdList);

    void checkCategoryIsExist(List<Integer> categoryIdList);

    Boolean checkAuth(List<Integer> pathIdList, String uri);

    boolean update(CategoryRequest request, Integer id);

    List<Category> getChildVoListByPid(Integer pid);

    int checkName(String name, Integer type);

    boolean checkUrl(String uri);

    /**
     * 获取类目名称
     * @param cateId
     */
    String getCategoryName(String cateId);

    /**
     * 修改分类加价率
     * @param request
     * @param merId
     * @return
     */
    CommonResult<Object> updateCateRatio(UpdateCateRatioRequest request, Integer merId);

    /**
     * 获取商户分类
     * @param type
     * @param status
     * @param merId
     * @return
     */
    List<CategoryTreeVo> getMerListTree(Integer type, Integer status, Integer merId);

    List<Category> getMerCateList(CategorySearchRequest request, PageParamRequest pageParamRequest, Integer merId);

    /**
     * 带权限的属性结构
     * @param type
     * @param status
     * @param identityType
     * @return
     */
    List<CategoryTreeVo> getListTreeDetail(Integer type, Integer status, Integer identityType, Integer merId);

    List<Integer> getAllCateIds(Integer id);

    /**
     * 功能描述: 注册获取所有一级分类
     * @Param: []
     * @Return: java.util.List<com.zbkj.crmeb.chant.model.CategoryMatch>
     * @Author: wangzh
     * @Date: 2023/4/26 15:09
     */
    List<CategoryMatch> getMainCategoryList();
}
